<template>
  <div style="font-size: 14px;"> 
     pinia的页面
  </div>
  <div> {{ store.count }} </div>
  <div> {{store.double  }} </div>
  <div><button @click="store.increment">按钮点击调用increment方法</button> </div>
</template>
 
<script setup>  
import { useCounterStore } from '../store/index.js'
// 可以在组件中的任意位置访问 `store` 变量 ✨
const store = useCounterStore()
console.log(store);
console.log(store.count); //  count   10
console.log(store.double); // double  10*2=20
  
</script>
 
<style lang = "less" scoped>
  
</style>../stores